Skip to content

Remove/update benchmarks#288

Open
kunalmohan wants to merge 5 commits into
fjall-rs:mainfrom
kunalmohan:fix/benchmarks
Open

Remove/update benchmarks#288
kunalmohan wants to merge 5 commits into
fjall-rs:mainfrom
kunalmohan:fix/benchmarks

Conversation

@kunalmohan
Copy link
Copy Markdown
Contributor

@kunalmohan kunalmohan commented Apr 19, 2026

The benchmarks were outdated and did not compile. This PR aims to update or remove the benchmarks.

Summary by CodeRabbit

  • Chores

    • Removed several legacy benchmark targets and retired multiple internal performance benchmarks to reduce maintenance.
    • Simplified benchmark registrations and groups.
  • Tests

    • Updated remaining benchmark suites to use current initialization and API patterns for consistency (explicit constructors, unified cache/sequence handling).
    • Removed redundant or deprecated benchmark cases.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Warning

Rate limit exceeded

@kunalmohan has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 14 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9e364d7a-f872-4f94-a5f7-5b22d656ef51

📥 Commits

Reviewing files that changed from the base of the PR and between ac85265 and 9396cf2.

📒 Files selected for processing (1)
  • Cargo.toml
📝 Walkthrough

Walkthrough

Removed several Criterion benchmark targets and files, deleted blocked-bloom benchmarks, and updated benchmark code to new APIs (Memtable construction, SeqNo/sequence counters, block-size policy, iterator typing, and cache/blob-tree config).

Changes

Benchmark cleanup & API updates

Layer / File(s) Summary
Manifest
Cargo.toml
Removed three explicit [[bench]] declarations: tli, block, and partition_point. Remaining bench entries unchanged.
Bench files removed
benches/tli.rs, benches/partition_point.rs, benches/block.rs
Deleted entire benchmark implementations and their criterion_group! / criterion_main! registrations.
Benchmark removals
benches/bloom.rs
Removed blocked-bloom benchmark functions (blocked_filter_construction, blocked_filter_contains); left standard bloom benchmarks.
Memtable construction & call args
benches/memtable.rs, benches/merge.rs
Replaced Memtable::default() with Memtable::new(0_u64); adjusted memtable.get args (Noneu64::MAX, Some(1)1). In merge.rs iterator mapping, added explicit item type via Ok::<_, lsm_tree::Error>.
Level manifest updates
benches/level_manifest.rs
Config::new calls now include SequenceNumberCounter::default() and use data_block_size_policy(BlockSizePolicy::all(1_024)); replaced counting tree.levels with tree.table_count(); removed find_segment benchmark.
Tree benchmarks & sequence-number / cache changes
benches/tree.rs
Reworked Config::new(...) to accept sequence counters and .use_cache(...); replaced None sequence parameters with SeqNo::MAX for len, get, iter, prefix; updated iterator filtering to use filter_map with guard.into_inner().ok()?; changed blob-tree construction to .use_cache(...).with_kv_separation(...).open() and blob reads to use SeqNo::MAX.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Remove/update benchmarks' accurately summarizes the main change—the PR removes outdated benchmarks and updates others to use current APIs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@benches/merge.rs`:
- Around line 9-11: The benchmark creates multiple Memtable instances with the
same ID (Memtable::new(0_u64)), violating the MemtableId uniqueness invariant;
change both maps that build memtables (the one assigning to variable memtables
and the second similar loop around lines 44-46) to supply distinct IDs (e.g.,
Memtable::new(i as u64) or a running counter) so each Memtable gets a unique
MemtableId instead of 0.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6174fb24-ebc3-42d0-b6e0-4e6357f59838

📥 Commits

Reviewing files that changed from the base of the PR and between 557cd0d and 071c2c2.

📒 Files selected for processing (7)
  • Cargo.toml
  • benches/bloom.rs
  • benches/level_manifest.rs
  • benches/memtable.rs
  • benches/merge.rs
  • benches/partition_point.rs
  • benches/tli.rs
💤 Files with no reviewable changes (4)
  • benches/bloom.rs
  • Cargo.toml
  • benches/tli.rs
  • benches/partition_point.rs

Comment thread benches/merge.rs
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@benches/tree.rs`:
- Around line 16-23: The TempDir guard is being moved into Config::new which
drops the guard before .open() runs; update each Config::new call (e.g., the one
shown and the other setup blocks) to pass the Path reference instead of the
TempDir by using path.path() or folder.path() so Config::new receives a path
slice. Search for all Config::new(...) occurrences in benches/tree.rs (lines
around the shown blocks and the other listed blocks) and replace the first
argument from the TempDir variable (path or folder) to path.path() /
folder.path(); leave the rest of the call (SequenceNumberCounter::default(),
.use_cache(...), .open().unwrap()) unchanged.
- Around line 404-420: The benchmark inserts a large value into the tree but
doesn't flush, so the timed "blob tree get" measures memtable lookup rather than
blob storage; before starting the c.bench_function closure call the tree's flush
method (e.g., invoke tree.flush and handle/unpack its Result) to persist the
blob to storage, ensure the flush completed successfully, then run the timed
b.iter to measure blob read performance; reference:
Config::new/...with_kv_separation, tree.insert, and the "blob tree get" bench.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5cc8da96-9e93-40dd-bc2a-7bd8bda42042

📥 Commits

Reviewing files that changed from the base of the PR and between 071c2c2 and 3f4c496.

📒 Files selected for processing (3)
  • Cargo.toml
  • benches/block.rs
  • benches/tree.rs
💤 Files with no reviewable changes (2)
  • benches/block.rs
  • Cargo.toml

Comment thread benches/tree.rs
Comment thread benches/tree.rs
Comment thread benches/level_manifest.rs Outdated
Comment thread benches/level_manifest.rs Outdated
@kunalmohan kunalmohan requested a review from marvin-j97 May 8, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants